const action = require("../action");

module.exports = {
    'GET /service-list': async (ctx, next) => {
        let serviceClass = ctx.query.class || "all";
        // let searchWord = ctx.query.search;
        let serviceData = await action.service.getServiceByClass(serviceClass);

        ctx.render("service-list.html", {
            "ui": {
                "title": "服务列表", 
                "env": process.env.NODE_ENV
            },
            "services": serviceData.services,
        });
    }
};

